import {
  IHome,
  IGoods,
  ICategory,
  IIndent,
  IUser,
  ISeckill,
  ISwiper,
  IPurchase,
  ICoupon,
} from "@icons/index";
import type { route } from "@type/route";

const Layout = () => import("@/layouts/index.vue");

//菜单路由
const menuRoutes: Array<route> = [
  {
    path: "/",
    component: Layout,
    icon: IHome,
    onlyOne: true,
    meta: {
      title: "主控台",
    },
    children: [
      {
        path: "dashboard",
        name: "dashboard",
        fullPath: "/dashboard",
        component: () => import("@pages/index/index.vue"),
        meta: {
          title: "主控台",
        },
      },
    ],
  },
  {
    path: "/goods",
    fullPath: "goods",
    component: Layout,
    icon: IGoods,
    onlyOne: true,
    meta: {
      title: "商品管理",
    },
    children: [
      {
        path: "index",
        name: "goods",
        fullPath: "/goods/index",
        component: () => import("@pages/goods/index.vue"),
        meta: {
          title: "商品管理",
        },
      },
    ],
  },
  {
    path: "/type",
    fullPath: "type",
    component: Layout,
    icon: ICategory,
    onlyOne: true,
    meta: {
      title: "分类管理",
    },
    children: [
      {
        path: "index",
        name: "type",
        fullPath: "/type/index",
        component: () => import("@pages/type/index.vue"),
        meta: {
          title: "分类管理",
        },
      },
    ],
  },
  {
    path: "/indent",
    fullPath: "indent",
    component: Layout,
    icon: IIndent,
    onlyOne: true,
    meta: {
      title: "订单管理",
    },
    children: [
      {
        path: "index",
        name: "indent",
        fullPath: "/indent/index",
        component: () => import("@pages/indent/index.vue"),
        meta: {
          title: "订单管理",
        },
      },
    ],
  },
  {
    path: "/users",
    fullPath: "users",
    component: Layout,
    icon: IUser,
    onlyOne: true,
    meta: {
      title: "用户管理",
    },
    children: [
      {
        path: "index",
        name: "users",
        fullPath: "/users/index",
        component: () => import("@pages/users/index.vue"),
        meta: {
          title: "用户管理",
        },
      },
    ],
  },
  {
    path: "/seckill",
    fullPath: "seckill",
    component: Layout,
    icon: ISeckill,
    onlyOne: true,
    meta: {
      title: "秒杀管理",
    },
    children: [
      {
        path: "index",
        name: "seckill",
        fullPath: "/seckill/index",
        component: () => import("@pages/seckill/index.vue"),
        meta: {
          title: "秒杀管理",
        },
      },
    ],
  },
  {
    path: "/swiper",
    fullPath: "swiper",
    component: Layout,
    icon: ISwiper,
    onlyOne: true,
    meta: {
      title: "活动轮播图管理",
    },
    children: [
      {
        path: "index",
        name: "swiper",
        fullPath: "/swiper/index",
        component: () => import("@pages/swiper/index.vue"),
        meta: {
          title: "活动轮播图管理",
        },
      },
    ],
  },
  // {
  //   path: "/purchase",
  //   fullPath: "purchase",
  //   component: Layout,
  //   icon: IPurchase,
  //   onlyOne: true,
  //   meta: {
  //     title: "进货管理",
  //   },
  //   children: [
  //     {
  //       path: "index",
  //       name: "purchase",
  //       fullPath: "/purchase/index",
  //       component: () => import("@pages/purchase/index.vue"),
  //       meta: {
  //         title: "进货管理",
  //       },
  //     },
  //   ],
  // },
  // {
  //   path: "/coupon",
  //   fullPath: "coupon",
  //   component: Layout,
  //   icon: ICoupon,
  //   onlyOne: true,
  //   meta: {
  //     title: "优惠卷管理",
  //   },
  //   children: [
  //     {
  //       path: "index",
  //       name: "coupon",
  //       fullPath: "/coupon/index",
  //       component: () => import("@pages/coupon/index.vue"),
  //       meta: {
  //         title: "优惠卷管理",
  //       },
  //     },
  //   ],
  // },
];

export default menuRoutes;
